using System;
using System.Collections.Generic;
using System.Text;

namespace EntLibEC.Info.PIM
{
    [Serializable]
    public class PropertyValueInfo : IComparable<PropertyValueInfo>
    {
        protected int _sysNo;
        protected int _propertySysNo;
        protected string _valueDescription = String.Empty;
        protected int _priority;
        protected int _lastEditUserSysNo;
        protected DateTime _lastEditTime;

        #region Public Properties
        public int SysNo
        {
            get { return _sysNo; }
            set { _sysNo = value; }
        }

        public int PropertySysNo
        {
            get { return _propertySysNo; }
            set { _propertySysNo = value; }
        }

        public string ValueDescription
        {
            get { return _valueDescription; }
            set { _valueDescription = value; }
        }

        public int Priority
        {
            get { return _priority; }
            set { _priority = value; }
        }

        public int LastEditUserSysNo
        {
            get { return _lastEditUserSysNo; }
            set { _lastEditUserSysNo = value; }
        }

        public DateTime LastEditTime
        {
            get { return _lastEditTime; }
            set { _lastEditTime = value; }
        }
        #endregion

        private string _lastEditUsername;

        /// <summary>
        /// Last Edit Username
        /// </summary>
        public string LastEditUsername
        {
            get { return _lastEditUsername; }
            set { _lastEditUsername = value; }
        }

        #region IComparable<PropertyValueInfo> Members

        public int CompareTo(PropertyValueInfo other)
        {
            return _priority - other.Priority;
        }

        #endregion
    }
}
